﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;

namespace PaathshalaClient.Helper.CommonReference
{
    public class ViewModelBase : INotifyPropertyChanged
    {
        public event PropertyChangedEventHandler PropertyChanged;

        protected void OnPropertyChanged(string propertyName)
        {
            if (this.PropertyChanged != null)
            {
                this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }
    }

    public class ViewModelBase<T> : ViewModelBase
    {
        public ViewModelBase(IView<T> view)
        {
            View = view;
        }
      
        public IView<T> View { get; set; }
    }
    
    public interface IView<in T>
    {
        void SendMessage(T message);
    }

}
